package com.course.domain.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import com.course.domain.vo.CourseQuesVo;
import com.course.domain.vo.CourseTagVo;
import com.course.domain.vo.MediaVo;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class CourseDto {
    private Long id;
    private String name;
    private Long categoryId;
    private MediaVo cover;
    private MediaVo video;
    private List<CourseTagVo> tags;
    private String description;
    private String detail;
    private List<CourseQuesVo> questions;
    private BigDecimal oriPrice;
    private BigDecimal discount;
    private BigDecimal curPrice;
    private Integer type;
    private List<CourseContentParent> courseContent;
    private List<MediaVo> previews;


    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class CourseContentParent {
        private String title;
        private List<CourseContentChild> children;
        private String index;
    }
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class CourseContentChild {
        private String title;
        private String fileName;
        private String fileContent;
        private Long fileId;
        private String index;
    }


}
